<script>
	const fUN_AmapLocation = uni.requireNativePlugin('FUN-AmapLocation');
	export default {
		onLaunch: function() {
			var timer = null;
			// 获取设备信息
			if (plus.os.name === 'Android') {
				var Settings = plus.android.importClass("android.provider.Settings");
				var context = plus.android.runtimeMainActivity().getContext();
				var androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
				uni.setStorageSync('androidID', androidId);
				uni.getSystemInfo({
					success(res) {
						uni.setStorageSync('phoneModel', res.model)
					}
				})
			} else {
				uni.showToast({
					title: '不支持IOS设备',
					icon: "none"
				})
			}

			timer =  setInterval(() => {
 
				 uni.getLocation({
				 	type: 'gcj02',
				 	altitude: true,
				 	success: (obj) => {
				 	},
				 	fail(err) {
				 		uni.showModal({
				 			title: '重要提示!',
				 			content: '为了提供更精准位置服务，您需要打开手机的定位功能且赋予App使用位置服务的权限！否则将无法正常使用App功能',
				 			showCancel: false,
				 			success: function(res) {
								
				 				if (res.confirm) {
				 				//	plus.runtime.quit();
				 				}
				 			}
				 		});
				 	   clearInterval(timer)
				 	},
				 
				 });
			 }, 10000)




		},
		onShow: function() {

		},
		onHide: function() {

		}
	}
</script>

<style lang="scss">
	@import "./uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
</style>